-
-
Notifications
You must be signed in to change notification settings - Fork 56
feat: extensions #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: extensions #430
Conversation
WalkthroughAdds a complete "extensions" feature: new domain models, YAML parser/validator, pluggable execution engine modules, storage/service/controller layers, DB migrations and loader, many templates, routes and RBAC, frontend pages/components/hooks, RTK Query slice and types, i18n entries, view dependency, and API version timestamp bump. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User (Browser)
participant FE as Frontend
participant API as API Router
participant C as ExtensionsController
participant S as ExtensionService
participant ST as Storage (DB)
U->>FE: Navigate /extensions
FE->>API: GET v1/extensions?...
API->>C: GetExtensions
C->>S: ListExtensions(params)
S->>ST: ListExtensions(params)
ST-->>S: ExtensionListResponse
S-->>C: ExtensionListResponse
C-->>API: 200 JSON
API-->>FE: 200 JSON
sequenceDiagram
autonumber
participant U as User
participant FE as Frontend
participant API as API Router
participant C as ExtensionsController
participant S as ExtensionService
participant ST as Storage
participant ENG as Engine
U->>FE: Run extension (vars / file)
FE->>API: POST v1/extensions/{id}/run
API->>C: RunExtension
C->>S: StartRun(extension_id, vars)
S->>ST: GetExtensionByID
ST-->>S: Extension + Spec
S->>ST: CreateExecution + CreateExecutionSteps
Note over S: async background execution started
par Background execution
S->>ENG: executeRun(spec, vars)
loop for each step
ENG-->>S: output, (optional) compensation
S->>ST: UpdateStep / CreateExtensionLog
end
S->>ST: UpdateExecution(status)
end
C-->>API: 200 Execution created
API-->>FE: 200 JSON
sequenceDiagram
autonumber
participant FE as Frontend
participant API as API Router
participant C as ExtensionsController
participant S as ExtensionService
participant ST as Storage
FE->>API: GET v1/extensions/execution/{id}/logs?after_seq=...
API->>C: ListExecutionLogs
C->>S: ListExecutionLogs(id, after, limit)
S->>ST: ListExtensionLogs(...)
ST-->>S: Logs[]
S-->>C: Logs + next_after
C-->>API: 200 {logs,next_after}
API-->>FE: 200 JSON
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (94)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@coderabbitai summary and short title |
@raghavyuva I'll regenerate the summary and short title for this PR about extensions functionality. ✅ Actions performedSummary regeneration triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
view/lib/i18n/locales/es.json (1)
1319-1348
: Critical: layout is incorrectly nested under navigation."layout" must be a top‑level key (see FR/KN). Current nesting will break i18n lookups.
Apply:
"navigation": { "dashboard": "Panel de Control", "selfHost": "Autoalojado", "fileManager": "Gestor de Archivos", "extensions": "Extensiones", "settings": "Configuración", "general": "General", "notifications": "Notificaciones", "team": "Equipo", "domains": "Dominios", - "containers": "Contenedores", - "layout": { - "breadcrumbs": { - "home": "Inicio", - "dashboard": "Panel de Control", - "selfHost": "Autoalojado", - "fileManager": "Gestor de Archivos", - "settings": "Configuración", - "general": "General", - "notifications": "Notificaciones", - "team": "Equipo", - "domains": "Dominios", - "update": "Actualizar", - "containers": "Contenedores" - }, - "terminal": { - "togglePosition": "Cambiar Posición del Terminal (Ctrl+T)" - } - } + "containers": "Contenedores" }, + "layout": { + "breadcrumbs": { + "home": "Inicio", + "dashboard": "Panel de Control", + "selfHost": "Autoalojado", + "fileManager": "Gestor de Archivos", + "settings": "Configuración", + "general": "General", + "notifications": "Notificaciones", + "team": "Equipo", + "domains": "Dominios", + "update": "Actualizar", + "containers": "Contenedores" + }, + "terminal": { + "togglePosition": "Cambiar Posición del Terminal (Ctrl+T)" + } + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
api/api/versions.json
(1 hunks)api/internal/features/supertokens/auth.go
(2 hunks)view/lib/i18n/locales/en.json
(3 hunks)view/lib/i18n/locales/es.json
(2 hunks)view/lib/i18n/locales/fr.json
(2 hunks)view/lib/i18n/locales/kn.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- view/lib/i18n/locales/en.json
🔇 Additional comments (10)
api/api/versions.json (2)
13-13
: LGTM.No functional change here.
6-6
: Validate RFC3339Nano support across consumers
Your jq test showsfromdateiso8601
fails on nine-digit fractional seconds and non-Z offsets. Ensure every client or library parsingrelease_date
accepts this format. If not, normalize timestamps to RFC3339 (≤3 decimal places) and UTCZ
.api/internal/features/supertokens/auth.go (3)
60-60
: LGTM! Read-only access appropriate for member role.The extension read permission added to the member role correctly follows the principle of least privilege, granting read-only access consistent with the existing member permission pattern.
65-65
: LGTM! Read-only access appropriate for viewer role.The extension read permission added to the viewer role is correct, maintaining the least privileged access level consistent with the viewer role's purpose.
46-46
: Extension endpoints RBAC enforcement confirmed The/extensions
routes usemiddleware.RBACMiddleware("extension")
, which maps HTTP methods toextension:read/create/update/delete
.view/lib/i18n/locales/kn.json (1)
16-20
: Common additions look good.Comma after preview present; JSON valid.
view/lib/i18n/locales/fr.json (3)
16-20
: Resolved: trailing comma after preview.JSON now valid.
1268-1314
: Extensions namespace complete.Includes run and noVariables; keys align with other locales.
1319-1320
: Navigation entry added correctly.navigation.extensions present and consistent.
view/lib/i18n/locales/es.json (1)
15-19
: Common additions OK.Comma after preview present; JSON valid.
@coderabbitai pause |
✅ Actions performedReviews paused. |
@coderabbitai summary |
✅ Actions performedSummary regeneration triggered. |
Summary by CodeRabbit
New Features
Documentation
Localization
Refactor